package com.hiultra.archive.service.impl;

import com.hiultra.archive.domain.ArcAlarm;
import com.hiultra.archive.mapper.ArcAlarmMapper;
import com.hiultra.archive.service.IArcAlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报警Service业务层处理
 * 
 * @author ls
 * @date 2022-07-28
 */
@Service
public class ArcAlarmServiceImpl implements IArcAlarmService
{
    @Autowired
    private ArcAlarmMapper arcAlarmMapper;

    /**
     * 查询报警
     * 
     * @param alarmId 报警主键
     * @return 报警
     */
    @Override
    public ArcAlarm selectArcAlarmByAlarmId(Long alarmId)
    {
        return arcAlarmMapper.selectArcAlarmByAlarmId(alarmId);
    }

    /**
     * 查询报警列表
     * 
     * @param arcAlarm 报警
     * @return 报警
     */
    @Override
    public List<ArcAlarm> selectArcAlarmList(ArcAlarm arcAlarm)
    {
        return arcAlarmMapper.selectArcAlarmList(arcAlarm);
    }

    /**
     * 新增报警
     * 
     * @param arcAlarm 报警
     * @return 结果
     */
    @Override
    public int insertArcAlarm(ArcAlarm arcAlarm)
    {
        return arcAlarmMapper.insertArcAlarm(arcAlarm);
    }

    /**
     * 修改报警
     * 
     * @param arcAlarm 报警
     * @return 结果
     */
    @Override
    public int updateArcAlarm(ArcAlarm arcAlarm)
    {
        return arcAlarmMapper.updateArcAlarm(arcAlarm);
    }

    /**
     * 批量删除报警
     * 
     * @param alarmIds 需要删除的报警主键
     * @return 结果
     */
    @Override
    public int deleteArcAlarmByAlarmIds(Long[] alarmIds)
    {
        return arcAlarmMapper.deleteArcAlarmByAlarmIds(alarmIds);
    }

    /**
     * 删除报警信息
     * 
     * @param alarmId 报警主键
     * @return 结果
     */
    @Override
    public int deleteArcAlarmByAlarmId(Long alarmId)
    {
        return arcAlarmMapper.deleteArcAlarmByAlarmId(alarmId);
    }
}
